<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/style.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
		<link rel="stylesheet" href="../css/wallet.css" />
		<style type="text/css">
			.payment_erweima canvas{width: 180px; height: 180px;}
			@media only screen and (min-width: 321px){.payment_conbox{margin-top: 0px;}.payment_erweima canvas,.payment_erweima{width: 210px; height: 210px;}.payment_conbox .tip{font-size: 17px; line-height: 30px;}}
			@media only screen and (min-width: 381px){.payment_conbox{margin-top: 0px;}.payment_erweima canvas,.payment_erweima{width: 240px; height: 240px;}.payment_conbox .tip{font-size: 18px; line-height: 30px;}}
			@media only screen and (width: 384px){.payment_erweima canvas,.payment_erweima{width: 220px; height: 220px;}}
			@media only screen and (min-width: 600px){.payment_conbox{margin-top: 0px;}.payment_erweima canvas,.payment_erweima{width: 340px; height: 340px;}.payment_conbox .tip{font-size: 25px; line-height: 30px;}.payment_btnbox{height: 70px; line-height: 70px; font-size: 27px;}}
			@media only screen and (min-width: 900px){.payment_conbox{margin-top: 0px;}}	
			.mui-bar-nav{background: white; box-shadow: none; color: #000000;}	
			.mui-bar-nav a, .mui-bar-nav h1{color: #000000;}
			.mui-bar-nav~.mui-content{padding-top: 64px;}	
		</style>
		<!--[if lt IE 9]> 
		<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script> 
		<![endif]--> 
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">收款码</h1>
		</header>
		<div class="mui-content payment_content">
			<div class="payment_conbox">
				<div class="payment_yhnam">XXXX</div>
				<div class="erweimabox">
					<p class="erweim_bt">扫一扫付款</p>
					<div class="payment_erweima"  >
						<div id="qrcode" ></div>
						<img id="code_img" src="" style="display: none;"/>
					</div>
					<ul class="erweima_bottom clearfix">
						<li>
							<p class="erwm_fkimg"><img src="../images/zhifubao.jpg"></p>
							<p>支付宝</p>
						</li>
						<li>
							<p class="erwm_fkimg"><img src="../images/weixin.jpg"></p>
							<p>微信支付</p>
						</li>
					</ul>
				</div>
				<div class="payment_info">
					<div class="left"><img src="../images/logo-ma.png"></div>
					<div class="right">
						<p>由龙信天下提供技术支持</p>
						<p>客服热线：0735-2481777</p>
					</div>
				</div>
			</div>
			<!--<div class="payment_butbox"><button type="button" class="payment_but">保存二维码</button></div>-->
		</div>
	</body>
</html>
<script src="../js/mui.min.js"></script>

<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/layer/layer.min.js"></script>
<script type="text/javascript" src="../js/jquery.form.js"></script>
<script type="text/javascript" src="../js/jquery.qrcode.js"></script>
<script type="text/javascript" src="../js/utf.js"></script>
<script type="text/javascript" src="../js/app.js"></script>
<script type="text/javascript">//fromuid
	
	get_navigation();
	var index = layer.load(0, {shade: false,time:800});
	$(".layui-layer-loading").css("left", "45%");
	//当前用户
	var member = JSON.parse(localStorage.getItem('member'));
	$('.payment_yhnam').text(member['nick_name']);
	
	
	
	//中间二维码
	
	var touxiang=user_tupian(member['thumb'],'/images/logo-ma.jpg');
    $("#qrcode").qrcode({
        render : "canvas",    //设置渲染方式，有table和canvas，使用canvas方式渲染性能相对来说比较好
        text : APP.web_root+"wallet/qrcode_pay.html?fromuid="+getUid(),    //扫描二维码后显示的内容,可以直接填一个网址，扫描二维码后自动跳向该链接
        width : "180",               //二维码的宽度
        height : "180",              //二维码的高度
        background : "#ffffff",       //二维码的后景色
        foreground : "#000000",        //二维码的前景色
        src: touxiang             //二维码中间的图片
    });
	$(".payment_bottom").click(function(){
		location.href="record.html?record_type=store_qrcode_record";
	});
	var code=$("#qrcode").html();
	//个人收款
	$(".payment_01").click(function(){
		location.href="payment.html";
	});
	
	//保存图片
	document.getElementById("qrcode").addEventListener('tap',function(){
		var score_canvas = document.getElementById("qrcode").firstElementChild;
		var imgData  = score_canvas.toDataURL('png');
		$('#code_img').attr('src',imgData);
		$("#qrcode").hide();
		$('#code_img').show();
	});
		
</script>